<template>
  <el-card>
    <template #header>测试</template>
    <common-form :form-infos="formInfos" @submit="testSubmit"></common-form>
  </el-card>
</template>

<script>
import { defineComponent, shallowReactive } from "vue";

export default defineComponent({
  setup() {
    let formInfos = shallowReactive([
      {
        id: 17,
        name: "CommonUpload",
        prop: 'upload',
        value: [],
        formItemAttrs: {
          label: "上传",
        }
      },
    ]);

    const testSubmit = (data) => {
      console.log(data);
    };

    return {
      formInfos,
      testSubmit,
    };
  },
});
</script>
